#ifndef __RGB_H__
#define __RGB_H__

#include "main.h"

#define CODE_1 (58)
#define CODE_0 (25)

#define BLACK_COLOR_STATE 0
#define LIGHT_COLOR_STATE 1

typedef struct
{
	
	uint8_t R;
	uint8_t G;
	uint8_t B;
	
}RGB_Color_TypeDef;

typedef struct
{
	uint8_t id;
	uint8_t R;
	uint8_t G;
	uint8_t B;
	uint8_t PWM_INDEX;
}COLOR_TypeDef;

extern const RGB_Color_TypeDef RED;     
extern const RGB_Color_TypeDef GREEN;  
extern const RGB_Color_TypeDef BLUE;   

extern const RGB_Color_TypeDef SKY;         
extern const RGB_Color_TypeDef MAGENTA;     
extern const RGB_Color_TypeDef YELLOW;    
extern const RGB_Color_TypeDef ORANGE;     
extern const RGB_Color_TypeDef BLACK;      
extern const RGB_Color_TypeDef WHITE;       
extern const RGB_Color_TypeDef LIGHT_PINK;  
extern const RGB_Color_TypeDef BAMBOO_GREEN; 
extern const RGB_Color_TypeDef LIGHT_GREEN;
extern const RGB_Color_TypeDef DEEP_PINK;
extern const RGB_Color_TypeDef LIGHT_PURPLE;
extern RGB_Color_TypeDef RGB_STATE_PRE;
extern RGB_Color_TypeDef RGB_RING[87];

extern RGB_Color_TypeDef RGB_STATE;
extern uint8_t Pre_index;
extern uint8_t sequence[87];
extern COLOR_TypeDef Pre_ID[87];
extern uint8_t sequence_1[6][17];
extern uint8_t Count_Time_RGB;
extern uint8_t Count_RGB_Flag;
extern uint8_t RGB_Change_Flag;
extern uint8_t Color_Flag;
#define Pixel_NUM 87

void RGB_SetLen(uint16_t Pixel_Len,RGB_Color_TypeDef Color);
void Full_COLOR(RGB_Color_TypeDef Color);
void RGB_SetColor(uint8_t LED_ID,RGB_Color_TypeDef Color);
void RGB_Set_Color(uint8_t LED_ID,uint8_t R,uint8_t G,uint8_t B);
void RGB_Set_Point(uint16_t id,RGB_Color_TypeDef Color);
void RGB_SetColor_Particular(uint8_t LED_ID,RGB_Color_TypeDef Color);
void RGB_Set_Point_Particular(uint16_t id,uint8_t R,uint8_t G,uint8_t B);
void RGB_Set_Point_Row(uint8_t row,uint8_t col,RGB_Color_TypeDef Color);
void RGB_Set_Point_Row_inorder(uint8_t row,uint8_t col,uint8_t R,uint8_t G,uint8_t B);
void Water_Flow_ROW(RGB_Color_TypeDef Color);
void Water_Flow_COL(RGB_Color_TypeDef Color);
void Breath(RGB_Color_TypeDef);
void Point_Water();
void RGB_SendArray(void);
void Point_Water_Independent(RGB_Color_TypeDef Color);
void Choose_Color();
#endif
